package _13数据追加续写和换行;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

//循环写入5行java到a.txt
public class Demo {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream("D:\\黑马java培训班\\代码\\itcast\\JavaSE\\day10\\abd\\aa\\a.txt",true);
        for (int i = 0; i < 5; i++) {
            fos.write("java天下第一".getBytes());
            fos.write("\r\n".getBytes());//换行符

        }
        fos.close();

    }
}
